\documentclass{article}
\openout 0 \jobname.c
\begin{document}
blabla
\write 0 {int hello();}
\closeout 0
\end{document}
